<div id="js_import_content" style="display: none;">
    {template file='contactimporter.block.indexload'}
    <input type='hidden' id='provider' value='{$sProvider}'>
    <input type='hidden' id='friends_count' value='{$iCnt}'>
    <input type="hidden" id="contacts" name="contacts" value="" />
    <div id="openinviter">
        <div id="openinviter_step_1" class="profile_friends">
            {if count($aJoineds)}
            <form id="members_invite" action="#" onsubmit="addConnection();return false;">
                <h3>
                    {phrase var='contactimporter.connect_people_you_know_on_palxi'}
                    <span>{phrase var='contactimporter.step_value_of_2' value=1}</span>
                </h3>
                <p class="description">{phrase var='contactimporter.stay_on_touch_with_your_contact'}</p>
                <div class="contact-list">
                        <div class="list_header">
                                <input id="list_user_check_all" type='checkbox'  checked="checked" onclick="checkAllMember(this);">
                                <label for="list_email_check_all">{phrase var='contactimporter.select_all'}</label>
                                <span class="total_selected">105 Selected</span>
                            </div>
                        <ul class="list_content">
                            {foreach from=$aJoineds name=users item=aUser}
                            <li class="{if is_int($phpfox.iteration.users/2)}row1{else}row2{/if} {if $phpfox.iteration.users == 1} row_first{/if}" id="js_invite_user_{$aUser.user_id}">
                                {if $aUser.user_id == Phpfox::getUserId()}
                                {else}
                                <input class="js_input_user" id="user_row_{$aUser.user_id}" checked="checked" type="checkbox" name="user[]" value="{$aUser.user_id}" />
                                <label for="user_row_{$aUser.user_id}">
                                    {img user=$aUser suffix='_50_square' max_width=50 max_height=50} <span>{$aUser.full_name}</span>
                                </label>
                                {/if}
                            </li>
                            {/foreach}
                        </ul>                 
                        <div>
                            <input class="button" type="submit" value="{phrase var='contactimporter.add_connection'}" /> 
                            or <a href="#" onclick="nextStep();return false;" >{phrase var='contactimporter.skip_this_step'}</a>
                        </div>
                </div>
                </form>
            {/if}
        </div>
        <div id="openinviter_step_2" class="profile_friends" style="display:none;">
            <h3>{phrase var='contactimporter.why_not_invite_some_people'}
                <span>{phrase var='contactimporter.step_value_of_2' value=2}</span>
            </h3>
            <p class="description">{phrase var='contactimporter.stay_on_touch_with_your_contact'}</p>
            <div style='display:none' id="error">
                <ul class="form-errors"><li><ul class="errors"><li id='error_content'></li></ul></li></ul>
            </div>
            <div class="clear"></div>
            <div class="contact-list">
                    <div class="list_header">
                        <input id="list_email_check_all" type='checkbox' onclick="checkAll('items[]', this.checked ? 1 : 0)" title='Select/Deselect all' checked="checked">
                        <label for="list_email_check_all">{phrase var='contactimporter.select_all'}</label>
                        <span class="total_selected">105 Selected</span>
                    </div>
                    <ul class="list_content">
                        {foreach from=$aInviteLists key=letter item=aInviteList}
                            {if $aInviteList}
                                {foreach from=$aInviteList key=i item=aInvite}
                                <li id="row_{$i}">
                                    <input id="input_row_{$i}" checked="checked" type="checkbox" name="items[]" value="{$aInvite.email}" />
                                    <label for="input_row_{$i}">{$aInvite.name}</label>
                                </li>                
                                {/foreach}
                            {/if}
                        {/foreach}                        
                    </ul>
            </div>
            <div class="clear"></div>
            {pager}
            <div class="clear"></div>
            <form method="post" action="{url link='contactimporter.invite'}" class="global_form" id='openinviterform' name='openinviterform' enctype="application/x-www-form-urlencoded" onsubmit="return check_select_invite();">
                <!--
                <div class="form-wrapper" id="message-wrapper" style="clear:both;margin-top:5px">
                    {if phpfox::getUserParam('contactimporter.hide_the_custom_invittation_message') == false}
                    <div class="form-label" id="message-label" style="width: 120px;text-align: left;"><br/>
                        <label class="optional" for="message" style="margin-top:5px">
                            {phrase var='contactimporter.custom_message_title'}
                            <textarea rows="6" cols="45" id="message" name="message">{phrase var='contactimporter.default_invite_message_text'}</textarea>
                        </label>
                    </div>
                    {/if}
                </div>-->
                <input id="send-button" class="button" type="button" value="{phrase var='contactimporter.add_to_network'}" />
                <!--
                {if $iCnt >= $iLimit && ($sProvider == 'yahoo' || $sProvider == 'gmail' || $sProvider == 'hotmail')}
                <input id="sendall-button" class="button" type='button' name='send' value="{phrase var='contactimporter.send_all' contacts=$iCnt}"/>
                {/if}
                <input id="skip-button" class="button" type='button' value ="{phrase var='contactimporter.skip'} &gt;&gt;" onclick="location.href='{url link='contactimporter'}';">
                -->
                <!--
                <h3>{phrase var='invite.send_a_custom_invitation_link'}</h3>
                {phrase var='invite.send_friends_your_custom_invitation_link_by_copy_and_pasting_it_into_your_own_email_application'}:
                <div class="p_4">
                    <input type="text" name="null" value="{$sIniviteLink}" id="js_custom_link" size="40" style="width:75%;" onfocus="this.select();" onkeypress="return false;" />
                </div>	-->	
            </form>
        </div>
    </div>
</div>

{if !PHPFOX_IS_AJAX}
<script type="text/javascript">
    $Behavior.contact_import_moving_data = function(){l}
    var oData = $('#js_import_content');
    $("#right").append(oData);
    oData.show();
    {r}
</script>
{/if}